import request from '@/axios'

//分页获取系统配置
export const pageApi = (data) => {
  return request.post({ url: '/rbac-server/rbac/system/page', data })
}

//新增取系统配置
export const addApi = (data) => {
  return request.post({ url: '/rbac-server/rbac/system/add', data })
}
//获取取系统配置
export const getApi = (params) => {
  return request.get({ url: '/rbac-server/rbac/system/get', params })
}
//删除取系统配置
export const delApi = (id) => {
  return request.delete({ url: '/rbac-server/rbac/system/delete', params: { id } })
}
//修改取系统配置
export const updateApi = (data) => {
  return request.put({ url: '/rbac-server/rbac/system/update', data })
}
//系统配置排序
export const sortApi = (params) => {
  return request.put({ url: '/rbac-server/rbac/system/sort', params })
}

//菜单配置首次加载系统数据
export const listTreeApi = () => {
  return request.get({ url: '/rbac-server/rbac/system/listTree' })
}
